package com.spzx.user.controller;

import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import com.spzx.user.service.SmsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Tag(name = "短信模块")
@RequestMapping("sms")
public class SmsController extends BaseController {
    @Resource
    SmsService smsService;
    @Operation(summary = "发送注册验证码")
    @GetMapping("/sendCode/{phone}")
    public AjaxResult smsService(@PathVariable String phone){
        return toAjax( smsService.sendCode(phone));
    }
}